clear r;
r = zeros(32,1);
for n = 1:32
    r(n) = rank(magic(n));
end